package com.ygqh.baby.service.wechat.model.good;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

/**
 * 好物圈——订单扩展信息
 *
 * @Author: sunshuo
 * @Date: 2019/5/21 10:57
 * @Version: 1.0
 */
public class GoodOrderExt implements Serializable {

	private static final long serialVersionUID = -2189390416269313438L;

	public static final int UNKOWN_PAYMENT_METHOD = 0; // 未知方式
	public static final int WECHAT_PAYMENT_METHOD = 1; // 微信支付
	public static final int OTHER_PAYMENT_METHOD = 2; // 其他支付方式

	/**
	 * 物品相关信息	必填
	 */
	private GoodOrderProduct productInfo;

	/**
	 * 快递信息	必填
	 */
	private GoodExpress expressInfo;

	/**
	 * 订单优惠信息	非必填
	 */
	private GoodPromotion promotionInfo;

	/**
	 * 商家信息	必填
	 */
	private GoodOrderBrand brandInfo;

	/**
	 * 发票信息，对于开发票订单，该字段必填	非必填
	 */
	private GoodInvoice invoiceInfo;

	/**
	 * 订单支付方式，0：未知方式 1：微信支付 2：其他支付方式		必填
	 */
	private int paymentMethod;

	/**
	 * 用户的openid，
	 * 参见<a href="https://wsad.weixin.qq.com/wsad/zh_CN/htmledition/order/html/document/quickstart/openid.part.html">
	 *     openid说明</a>		必填
	 */
	private String userOpenId;

	/**
	 * 订单详情页（小程序页面）		必填
	 */
	private GoodOrderDetailPage orderDetailPage;

	@JSONField(name = "product_info")
	public GoodOrderProduct getProductInfo() {
		return productInfo;
	}

	public void setProductInfo(GoodOrderProduct productInfo) {
		this.productInfo = productInfo;
	}

	@JSONField(name = "express_info")
	public GoodExpress getExpressInfo() {
		return expressInfo;
	}

	public void setExpressInfo(GoodExpress expressInfo) {
		this.expressInfo = expressInfo;
	}

	@JSONField(name = "promotion_info")
	public GoodPromotion getPromotionInfo() {
		return promotionInfo;
	}

	public void setPromotionInfo(GoodPromotion promotionInfo) {
		this.promotionInfo = promotionInfo;
	}

	@JSONField(name = "brand_info")
	public GoodOrderBrand getBrandInfo() {
		return brandInfo;
	}

	public void setBrandInfo(GoodOrderBrand brandInfo) {
		this.brandInfo = brandInfo;
	}

	@JSONField(name = "invoice_info")
	public GoodInvoice getInvoiceInfo() {
		return invoiceInfo;
	}

	public void setInvoiceInfo(GoodInvoice invoiceInfo) {
		this.invoiceInfo = invoiceInfo;
	}

	@JSONField(name = "payment_method")
	public int getPaymentMethod() {
		return paymentMethod;
	}

	public void setPaymentMethod(int paymentMethod) {
		this.paymentMethod = paymentMethod;
	}

	@JSONField(name = "user_open_id")
	public String getUserOpenId() {
		return userOpenId;
	}

	public void setUserOpenId(String userOpenId) {
		this.userOpenId = userOpenId;
	}

	@JSONField(name = "order_detail_page")
	public GoodOrderDetailPage getOrderDetailPage() {
		return orderDetailPage;
	}

	public void setOrderDetailPage(GoodOrderDetailPage orderDetailPage) {
		this.orderDetailPage = orderDetailPage;
	}

	@Override
	public String toString() {
		return "GoodOrderExt{" +
				"productInfo=" + productInfo +
				", expressInfo=" + expressInfo +
				", promotionInfo=" + promotionInfo +
				", brandInfo=" + brandInfo +
				", invoiceInfo=" + invoiceInfo +
				", paymentMethod=" + paymentMethod +
				", userOpenId='" + userOpenId + '\'' +
				", orderDetailPage=" + orderDetailPage +
				'}';
	}
}
